home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 413_01 / sbf3 / sbmidi.c < prev    next >
C/C++ Source or Header  |  1992-04-04  |  298b  |  19 lines

  1. #include <stdio.h>
  2. #include <dos.h>
  3. #include "sb.h"
  4.  
  5. int Sb_Read_MIDI(void)
  6. {
  7.     writedac(MIDI_READ_POLL);
  8.  
  9.     while(!(inportb(DSP_DATA_AVAIL) & 0x80))
  10.      ;
  11.     return inportb(DSP_READ_DATA);
  12. }
  13.  
  14. void Sb_Write_MIDI(int data)
  15. {
  16.     writedac(MIDI_WRITE_POLL);
  17.     writedac(data);
  18. }
  19.